
import 'dart:async';
import '../utils/ApiService.dart';
import 'definitions/ResultMyStatisticsModel.dart';


class StatisticsController {

    static String myUsingGetPath = "/api/statistics/my";
    /// 1. 我的统计数据
    static Future<ResultMyStatisticsModel> myUsingGet([dynamic headers]) async {
      var response = await ApiService.get("/api/statistics/my", {}, headers);
      return ResultMyStatisticsModel()..fromJson(response.data);
    }
    
    static String userUsingGetPath = "/api/statistics/user/{id}";
    /// 2. 根据用户ID获取统计数据
    static Future<ResultMyStatisticsModel> userUsingGet(String id, [dynamic headers]) async {
      var response = await ApiService.get("/api/statistics/user/$id", {}, headers);
      return ResultMyStatisticsModel()..fromJson(response.data);
    }
    
}